home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pyr_lightboxlines.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  138 lines

  1. # Jones 3D Cog Script
  2. #
  3. # pyr_lightboxlines.cog
  4. #    
  5. # Saylines for placards near lightboxes
  6. #
  7. # [RKD]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. message    startup
  14. message    activated
  15.  
  16. # cameras and camera looks
  17. thing    saycam        nolink
  18. thing    saycamlook    nolink
  19.  
  20. # actors
  21. thing    player        nolink    local
  22. thing    indyactor    nolink
  23.  
  24. # surfaces
  25. surface    hieratic
  26.  
  27. # keyframes
  28. keyframe    in_PushHat=0in_figithat_4_4.key        local
  29. keyframe    in_handsToHips=0in_stand1_bd_4.key    local
  30.  
  31. # saylines
  32. sound    writing=pr12j03.wav        local
  33. sound    knowledge1=pr12j04.wav    local
  34. sound    dime=pr12j05.wav        local
  35. sound    knowledge2=pr12j06.wav    local
  36.  
  37. # variables
  38. int        curkey=0        local
  39.  
  40. # subroutines
  41. flex    startscene=0.0    local
  42. flex    endscene=0.0    local
  43. flex    fixcams=0.0        local
  44. flex    changecam=0.0    local
  45. end
  46.  
  47. code
  48. startup:
  49.     #global9 determines how many times the writing has been read
  50.     global9 = 0;
  51.  
  52.     return;
  53.  
  54. activated:
  55. # ---> heiratic wall
  56.  
  57.     DeselectWeaponWait(GetLocalPlayerThing());
  58.  
  59.     player = GetLocalPlayerThing();
  60.     call startscene;
  61.     call changecam;
  62.     
  63.     AISetLookPos(indyactor, GetSurfaceCenter(hieratic));
  64.     
  65.     sleep(.5);
  66.     
  67.     if (global9 == 0)
  68.     {
  69.         PlayVoice(indyactor, writing, 1, 1);
  70.         curkey = PlayKey(indyactor, in_handsToHips, 4, 0x14, 0); # 0.87 sec
  71.         sleep(.5);
  72.         PlayVoice(indyactor, knowledge1, 1, 1);
  73.         StopKey(indyactor, curkey, 0.1);
  74.         curkey = PlayKey(indyactor, in_PushHat, 6, 0x12, 0);
  75.         Sleep(.5);
  76.         PlayVoice(indyactor, dime, 1, 0);
  77.         Sleep(.5);
  78.         StopKey(indyactor, curkey, .5);
  79.         Sleep(.5);
  80.     }
  81.     else
  82.     {
  83.         PlayVoice(player, knowledge2, 1, 1);
  84.     }
  85.     
  86.     sleep(1.5);
  87.  
  88.     global9 = global9 + 1;
  89.     
  90.     call endscene;
  91.     ResetThing(indyactor);
  92.     return;
  93.     
  94. changecam:
  95.     SetCameraFocus(2, saycam);
  96.     SetCameraSecondaryFocus(2, saycamlook);
  97.     SetCurrentCamera(2);
  98.     ResetCameraFOV(0, 0);
  99.         
  100.     return;
  101.     
  102. startscene:
  103.     call fixcams;
  104.     
  105.     StartCutscene(0);
  106.     CopyPlayerHolsters(player, indyactor);
  107.     ClearThingFlags(indyactor, 0x80000);
  108.     StopThing(player);
  109.     SetThingFlags(player, 0x80000);
  110.     SetActorFlags(player, 0x200000);
  111.         
  112.     return;
  113.             
  114. endscene:
  115.     CopyOrientAndPos(indyactor, player);
  116.     SetThingFlags(indyactor, 0x80000);
  117.     ClearThingFlags(player, 0x80000);
  118.     ClearActorFlags(player, 0x200000);
  119.     
  120.     SetCameraPosition(1, GetThingPos(saycam));
  121.     SetCurrentCamera(1);
  122.     EndCutscene();
  123.  
  124.     return;
  125.  
  126. fixcams:
  127.     # reset camera settings
  128.     ResetCameraFOV(0, 0);
  129.     SetCameraPosInterp(2, 0);
  130.     SetCameraLookInterp(2, 0);
  131.     SetCameraPosInterp(1, 0);
  132.     SetCameraLookInterp(1, 0);
  133.     RestoreExtCam();
  134.     return;
  135.     
  136. end
  137.  
  138.